# -*- encoding:utf-8 -*-
# !/usr/bin/env python
'''
    python-0817-03.py
    ======================
    @descript: 处理异常
    @copyright:nnz
    @author:dln
    @date: 2021/8/17 16:47
    @version:v1.0
'''
#导入第三方库traceback
import sys
import traceback

v_result=0
try:
    v_01_str=sys.argv[1]
    v_01=int(v_01_str)
    v_result=10/v_01
except IndexError as e:
    traceback.print_exc()
except ValueError as e:
    traceback.print_exc()
except Exception as e:
    traceback.print_exc()
print('变量v_sulte的值为：{}'.format(v_result))


v_result=0
try:
    v_01_str=sys.argv[1]
    v_01=int(v_01_str)
    v_result=10/v_01
except (IndexError,ValueError,Exception) as e:
    traceback.print_exc()
print('变量v_sulte的值为：{}'.format(v_result))